package com.design.factory.SimpleFactory;

//建立一个简单披萨工厂
public class SimplePizzaFactory {

	public Pizza createPizza(String type) {
		Pizza pizza = null;

		if (type.equals("cheese")) {
			pizza = new PizzaCheese();
		}  else if (type.equals("veggie")) {
			pizza = new PizzaVeggie();
		}
		return pizza;
	}
}
